use crate::makepad_platform::*;

live_design! {
    link theme_desktop_light;
    use link::shaders::*;
    
    // GLOBAL PARAMETERS
    pub THEME_COLOR_CONTRAST = 1.0
    pub THEME_COLOR_TINT = #0000ff
    pub THEME_COLOR_TINT_AMOUNT = 0.0
    pub THEME_SPACE_FACTOR = 6. // Increase for a less dense layout
    pub THEME_CORNER_RADIUS = 2.5
    pub THEME_BEVELING = 0.75
    pub THEME_FONT_SIZE_BASE = 10.
    pub THEME_FONT_SIZE_CONTRAST = 2.5// Greater values = greater font-size steps between font-formats (i.e. from H3 to H2)

    // DIMENSIONS
    pub THEME_SPACE_1 = (0.5 * (THEME_SPACE_FACTOR))
    pub THEME_SPACE_2 = (1.0 * (THEME_SPACE_FACTOR))
    pub THEME_SPACE_3 = (1.5 * (THEME_SPACE_FACTOR))

    pub THEME_MSPACE_1 = {top: (THEME_SPACE_1), right: (THEME_SPACE_1), bottom: (THEME_SPACE_1), left: (THEME_SPACE_1)} 
    pub THEME_MSPACE_H_1 = {top: 0., right: (THEME_SPACE_1), bottom: 0., left: (THEME_SPACE_1)}
    pub THEME_MSPACE_V_1 = {top: (THEME_SPACE_1), right: 0., bottom: (THEME_SPACE_1), left: 0.}
    pub THEME_MSPACE_2 = {top: (THEME_SPACE_2), right: (THEME_SPACE_2), bottom: (THEME_SPACE_2), left: (THEME_SPACE_2)}
    pub THEME_MSPACE_H_2 = {top: 0., right: (THEME_SPACE_2), bottom: 0., left: (THEME_SPACE_2)}
    pub THEME_MSPACE_V_2 = {top: (THEME_SPACE_2), right: 0., bottom: (THEME_SPACE_2), left: 0.}
    pub THEME_MSPACE_3 = {top: (THEME_SPACE_3), right: (THEME_SPACE_3), bottom: (THEME_SPACE_3), left: (THEME_SPACE_3)}
    pub THEME_MSPACE_H_3 = {top: 0., right: (THEME_SPACE_3), bottom: 0., left: (THEME_SPACE_3)}
    pub THEME_MSPACE_V_3 = {top: (THEME_SPACE_3), right: 0., bottom: (THEME_SPACE_3), left: 0.}

    pub THEME_DATA_ITEM_HEIGHT = (7.75 * THEME_SPACE_1);
    pub THEME_DATA_ICON_WIDTH = (2.6 * THEME_SPACE_2);
    pub THEME_DATA_ICON_HEIGHT = (3.6 * THEME_SPACE_2);

    pub THEME_CONTAINER_CORNER_RADIUS = (THEME_CORNER_RADIUS * 2.)
    pub THEME_TEXTSELECTION_CORNER_RADIUS = (THEME_CORNER_RADIUS * .5)
    pub THEME_TAB_HEIGHT = (6 * THEME_SPACE_FACTOR),
    pub THEME_TAB_FLAT_HEIGHT = (5.5 * THEME_SPACE_FACTOR),
    pub THEME_SPLITTER_HORIZONTAL = 16.0,
    pub THEME_SPLITTER_SIZE = 10.0,
    pub THEME_SPLITTER_MIN_HORIZONTAL = (THEME_TAB_HEIGHT),
    pub THEME_SPLITTER_MAX_HORIZONTAL = (THEME_TAB_HEIGHT + THEME_SPLITTER_SIZE),
    pub THEME_SPLITTER_MIN_VERTICAL = (THEME_SPLITTER_HORIZONTAL),
    pub THEME_SPLITTER_MAX_VERTICAL = (THEME_SPLITTER_HORIZONTAL + THEME_SPLITTER_SIZE),
    pub THEME_SPLITTER_SIZE = 5.0
    pub THEME_DOCK_BORDER_SIZE: 0.0

    // COLOR PALETTE
    pub THEME_COLOR_W = #FFFFFFFF
    pub THEME_COLOR_W_H = #FFFFFF00
    pub THEME_COLOR_B = #000000FF
    pub THEME_COLOR_B_H = #00000000

    pub THEME_COLOR_WHITE = (mix(THEME_COLOR_W, #FFFFFF00, pow(0.1, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_6 = (mix(THEME_COLOR_W, THEME_COLOR_W_H, pow(0.2, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_5 = (mix(THEME_COLOR_W, THEME_COLOR_W_H, pow(0.35, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_4 = (mix(THEME_COLOR_W, THEME_COLOR_W_H, pow(0.6, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_3 = (mix(THEME_COLOR_W, THEME_COLOR_W_H, pow(0.8, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_2 = (mix(THEME_COLOR_W, THEME_COLOR_W_H, pow(0.85, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_15 = (mix(THEME_COLOR_W, THEME_COLOR_W_H, pow(0.9, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_1 = (mix(THEME_COLOR_W, THEME_COLOR_W_H, pow(0.95, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_U_HIDDEN = (THEME_COLOR_W_H)

    pub THEME_COLOR_D_HIDDEN = (THEME_COLOR_B_H)
    pub THEME_COLOR_D_025 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.965, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_D_05 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.925, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_D_075 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.9, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_D_1 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.875, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_D_2 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.75, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_D_3 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.6, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_D_4 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.4, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_D_5 = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.25, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_BLACK = (mix(THEME_COLOR_B, THEME_COLOR_B_H, pow(0.1, THEME_COLOR_CONTRAST)))

    pub THEME_COLOR_BG_APP = (mix(
        (THEME_COLOR_W * mix(#ffffff, THEME_COLOR_TINT, THEME_COLOR_TINT_AMOUNT)),
        (THEME_COLOR_B * mix(#ffffff, THEME_COLOR_TINT, THEME_COLOR_TINT_AMOUNT)),
        pow(0.15, THEME_COLOR_CONTRAST)))
    pub THEME_COLOR_FG_APP = (mix(
        (THEME_COLOR_W * mix(#ffffff, THEME_COLOR_TINT, THEME_COLOR_TINT_AMOUNT)),
        (THEME_COLOR_B * mix(#ffffff, THEME_COLOR_TINT, THEME_COLOR_TINT_AMOUNT)),
        pow(0.175, THEME_COLOR_CONTRAST))
    )
    pub THEME_COLOR_OPAQUE_U_6 = (mix(THEME_COLOR_FG_APP, #F, 0.8))
    pub THEME_COLOR_OPAQUE_U_5 = (mix(THEME_COLOR_FG_APP, #F, 0.7))
    pub THEME_COLOR_OPAQUE_U_4 = (mix(THEME_COLOR_FG_APP, #F, 0.5))
    pub THEME_COLOR_OPAQUE_U_3 = (mix(THEME_COLOR_FG_APP, #F, 0.35))
    pub THEME_COLOR_OPAQUE_U_2 = (mix(THEME_COLOR_FG_APP, #F, 0.25))
    pub THEME_COLOR_OPAQUE_U_1 = (mix(THEME_COLOR_FG_APP, #F, 0.15))

    pub THEME_COLOR_OPAQUE_D_05 = (mix(THEME_COLOR_FG_APP, #0, 0.05))
    pub THEME_COLOR_OPAQUE_D_1 = (mix(THEME_COLOR_FG_APP, #0, 0.15))
    pub THEME_COLOR_OPAQUE_D_2 = (mix(THEME_COLOR_FG_APP, #0, 0.25))
    pub THEME_COLOR_OPAQUE_D_3 = (mix(THEME_COLOR_FG_APP, #0, 0.45))
    pub THEME_COLOR_OPAQUE_D_4 = (mix(THEME_COLOR_FG_APP, #0, 0.6))
    pub THEME_COLOR_OPAQUE_D_5 = (mix(THEME_COLOR_FG_APP, #0, 0.75))

    // BASICS
    pub THEME_COLOR_MAKEPAD = #FF5C39FF

    pub THEME_COLOR_SHADOW = (THEME_COLOR_D_1)
    pub THEME_COLOR_SHADOW_FOCUS = (THEME_COLOR_D_2)
    pub THEME_COLOR_SHADOW_DISABLED = (THEME_COLOR_D_1)
    pub THEME_COLOR_SHADOW_FLAT = (THEME_COLOR_D_1)
    pub THEME_COLOR_SHADOW_FLAT_DISABLED = (THEME_COLOR_OPAQUE_D_1)
    pub THEME_COLOR_LIGHT = (THEME_COLOR_U_4)
    pub THEME_COLOR_LIGHT_HOVER = (THEME_COLOR_U_5)
    pub THEME_COLOR_LIGHT_FOCUS = (THEME_COLOR_U_5)
    pub THEME_COLOR_LIGHT_DISABLED = (THEME_COLOR_U_4)

    pub THEME_COLOR_FLAT_FOCUS = (THEME_COLOR_D_2)

    pub THEME_COLOR_BG_HIGHLIGHT = (THEME_COLOR_U_1)
    pub THEME_COLOR_BG_UNFOCUSSED = (THEME_COLOR_BG_HIGHLIGHT * 0.85)
    pub THEME_COLOR_APP_CAPTION_BAR = (THEME_COLOR_D_HIDDEN)
    pub THEME_COLOR_DRAG_QUAD = (THEME_COLOR_U_5)
    pub THEME_COLOR_DRAG_TARGET_PREVIEW = (THEME_COLOR_U_2)

    pub THEME_COLOR_CURSOR = (THEME_COLOR_WHITE)
    pub THEME_COLOR_CURSOR_FOCUS = (THEME_COLOR_WHITE)
    pub THEME_COLOR_CURSOR_EMPTY = (THEME_COLOR_WHITE)
    pub THEME_COLOR_CURSOR_DISABLED = (THEME_COLOR_U_HIDDEN)
    pub THEME_COLOR_CURSOR_BORDER = (THEME_COLOR_WHITE)

    pub THEME_COLOR_HIGHLIGHT = (THEME_COLOR_D_1)
    pub THEME_COLOR_TEXT_CURSOR = (THEME_COLOR_WHITE)
    pub THEME_COLOR_BG_HIGHLIGHT_INLINE = (THEME_COLOR_D_1)

    pub THEME_COLOR_TEXT = (THEME_COLOR_D_4)
    pub THEME_COLOR_TEXT_VAL = (THEME_COLOR_D_2)
    pub THEME_COLOR_TEXT_HL = (THEME_COLOR_TEXT)
    pub THEME_COLOR_TEXT_HOVER = (THEME_COLOR_TEXT)
    pub THEME_COLOR_TEXT_FOCUS = (THEME_COLOR_TEXT)
    pub THEME_COLOR_TEXT_DOWN = (THEME_COLOR_TEXT)
    pub THEME_COLOR_TEXT_DISABLED = (THEME_COLOR_D_1)
    pub THEME_COLOR_TEXT_PLACEHOLDER = (THEME_COLOR_D_3)
    pub THEME_COLOR_TEXT_PLACEHOLDER_HOVER = (THEME_COLOR_D_3)
    pub THEME_COLOR_TEXT_META = (THEME_COLOR_D_3)

    pub THEME_COLOR_LABEL_INNER = (THEME_COLOR_D_4)
    pub THEME_COLOR_LABEL_INNER_DOWN = (THEME_COLOR_D_5)
    pub THEME_COLOR_LABEL_INNER_DRAG = (THEME_COLOR_LABEL_INNER_DOWN)
    pub THEME_COLOR_LABEL_INNER_HOVER = (THEME_COLOR_LABEL_INNER)
    pub THEME_COLOR_LABEL_INNER_FOCUS = (THEME_COLOR_LABEL_INNER)
    pub THEME_COLOR_LABEL_INNER_ACTIVE = (THEME_COLOR_LABEL_INNER)
    pub THEME_COLOR_LABEL_INNER_INACTIVE = (THEME_COLOR_D_3)
    pub THEME_COLOR_LABEL_INNER_DISABLED = (THEME_COLOR_D_1)

    pub THEME_COLOR_LABEL_OUTER = (THEME_COLOR_D_5)
    pub THEME_COLOR_LABEL_OUTER_OFF = (THEME_COLOR_D_3)
    pub THEME_COLOR_LABEL_OUTER_DOWN = (THEME_COLOR_LABEL_OUTER)

    pub THEME_COLOR_LABEL_OUTER_DRAG = (THEME_COLOR_LABEL_OUTER)
    pub THEME_COLOR_LABEL_OUTER_HOVER = (THEME_COLOR_LABEL_OUTER)
    pub THEME_COLOR_LABEL_OUTER_FOCUS = (THEME_COLOR_LABEL_OUTER)
    pub THEME_COLOR_LABEL_OUTER_ACTIVE = (THEME_COLOR_LABEL_OUTER)
    pub THEME_COLOR_LABEL_OUTER_ACTIVE_FOCUS = (THEME_COLOR_LABEL_OUTER)
    pub THEME_COLOR_LABEL_OUTER_DISABLED = (THEME_COLOR_D_1)

    pub THEME_COLOR_BG_CONTAINER = (THEME_COLOR_U_3 * 0.8)
    pub THEME_COLOR_BG_EVEN = (THEME_COLOR_BG_CONTAINER * 0.875)
    pub THEME_COLOR_BG_ODD = (THEME_COLOR_BG_CONTAINER * 1.125)

    pub THEME_COLOR_BEVEL = (THEME_COLOR_SHADOW_FLAT)
    pub THEME_COLOR_BEVEL_HOVER = (THEME_COLOR_FLAT_FOCUS)
    pub THEME_COLOR_BEVEL_FOCUS = (THEME_COLOR_BEVEL_HOVER)
    pub THEME_COLOR_BEVEL_ACTIVE = (THEME_COLOR_BEVEL)
    pub THEME_COLOR_BEVEL_EMPTY = (THEME_COLOR_BEVEL)
    pub THEME_COLOR_BEVEL_DOWN = (THEME_COLOR_BEVEL_HOVER)
    pub THEME_COLOR_BEVEL_DRAG = (THEME_COLOR_BEVEL_HOVER)
    pub THEME_COLOR_BEVEL_DISABLED = (THEME_COLOR_SHADOW_FLAT_DISABLED)

    pub THEME_COLOR_BEVEL_INSET_1 = (THEME_COLOR_SHADOW)
    pub THEME_COLOR_BEVEL_INSET_1_HOVER = (THEME_COLOR_BEVEL_INSET_1)
    pub THEME_COLOR_BEVEL_INSET_1_FOCUS = (THEME_COLOR_SHADOW_FOCUS)
    pub THEME_COLOR_BEVEL_INSET_1_ACTIVE = (THEME_COLOR_BEVEL_INSET_1)
    pub THEME_COLOR_BEVEL_INSET_1_EMPTY = (THEME_COLOR_BEVEL_INSET_1)
    pub THEME_COLOR_BEVEL_INSET_1_DOWN = (THEME_COLOR_BEVEL_INSET_1)
    pub THEME_COLOR_BEVEL_INSET_1_DRAG = (THEME_COLOR_BEVEL_INSET_1)
    pub THEME_COLOR_BEVEL_INSET_1_DISABLED = (THEME_COLOR_SHADOW_DISABLED)

    pub THEME_COLOR_BEVEL_INSET_2 = (THEME_COLOR_LIGHT)
    pub THEME_COLOR_BEVEL_INSET_2_HOVER = (THEME_COLOR_LIGHT_FOCUS)
    pub THEME_COLOR_BEVEL_INSET_2_FOCUS = (THEME_COLOR_BEVEL_INSET_2_HOVER)
    pub THEME_COLOR_BEVEL_INSET_2_ACTIVE = (THEME_COLOR_BEVEL_INSET_2)
    pub THEME_COLOR_BEVEL_INSET_2_EMPTY = (THEME_COLOR_BEVEL_INSET_2)
    pub THEME_COLOR_BEVEL_INSET_2_DOWN = (THEME_COLOR_BEVEL_INSET_2_HOVER)
    pub THEME_COLOR_BEVEL_INSET_2_DRAG = (THEME_COLOR_BEVEL_INSET_2_HOVER)
    pub THEME_COLOR_BEVEL_INSET_2_DISABLED = (THEME_COLOR_LIGHT_DISABLED)

    pub THEME_COLOR_BEVEL_OUTSET_1 = (THEME_COLOR_LIGHT)
    pub THEME_COLOR_BEVEL_OUTSET_1_HOVER = (THEME_COLOR_LIGHT_HOVER)
    pub THEME_COLOR_BEVEL_OUTSET_1_FOCUS = (THEME_COLOR_BEVEL_OUTSET_1_HOVER)
    pub THEME_COLOR_BEVEL_OUTSET_1_ACTIVE = (THEME_COLOR_LIGHT)
    pub THEME_COLOR_BEVEL_OUTSET_1_DOWN = (THEME_COLOR_SHADOW)
    pub THEME_COLOR_BEVEL_OUTSET_1_DRAG = (THEME_COLOR_BEVEL_OUTSET_1_DOWN)
    pub THEME_COLOR_BEVEL_OUTSET_1_DISABLED = (THEME_COLOR_LIGHT_DISABLED)

    pub THEME_COLOR_BEVEL_OUTSET_2 = (THEME_COLOR_SHADOW)
    pub THEME_COLOR_BEVEL_OUTSET_2_HOVER = (THEME_COLOR_SHADOW)
    pub THEME_COLOR_BEVEL_OUTSET_2_FOCUS = (THEME_COLOR_BEVEL_OUTSET_2_HOVER)
    pub THEME_COLOR_BEVEL_OUTSET_2_ACTIVE = (THEME_COLOR_SHADOW)
    pub THEME_COLOR_BEVEL_OUTSET_2_DOWN = (THEME_COLOR_LIGHT)
    pub THEME_COLOR_BEVEL_OUTSET_2_DRAG = (THEME_COLOR_BEVEL_OUTSET_2_DOWN)
    pub THEME_COLOR_BEVEL_OUTSET_2_FOCUS = (THEME_COLOR_SHADOW_FOCUS)
    pub THEME_COLOR_BEVEL_OUTSET_2_DISABLED = (THEME_COLOR_SHADOW_DISABLED)

    // Background of textinputs, radios, checkboxes etc.
    pub THEME_COLOR_INSET = (THEME_COLOR_D_075)
    pub THEME_COLOR_INSET_HOVER = (THEME_COLOR_INSET)
    pub THEME_COLOR_INSET_DOWN = (THEME_COLOR_INSET_HOVER)
    pub THEME_COLOR_INSET_ACTIVE = (THEME_COLOR_INSET_HOVER)
    pub THEME_COLOR_INSET_FOCUS = (THEME_COLOR_INSET_HOVER)
    pub THEME_COLOR_INSET_DRAG = (THEME_COLOR_INSET)
    pub THEME_COLOR_INSET_DISABLED = (THEME_COLOR_D_025)
    pub THEME_COLOR_INSET_EMPTY = (THEME_COLOR_INSET)

    pub THEME_COLOR_INSET_1 = (THEME_COLOR_D_1)
    pub THEME_COLOR_INSET_1_HOVER = (THEME_COLOR_D_2)
    pub THEME_COLOR_INSET_1_DOWN = (THEME_COLOR_INSET_1_HOVER)
    pub THEME_COLOR_INSET_1_ACTIVE = (THEME_COLOR_INSET_1_HOVER)
    pub THEME_COLOR_INSET_1_FOCUS = (THEME_COLOR_INSET_1_HOVER)
    pub THEME_COLOR_INSET_1_DRAG = (THEME_COLOR_INSET_1_HOVER)
    pub THEME_COLOR_INSET_1_EMPTY = (THEME_COLOR_U_HIDDEN)
    pub THEME_COLOR_INSET_1_DISABLED = (THEME_COLOR_D_025)

    pub THEME_COLOR_INSET_2 = (THEME_COLOR_D_05)
    pub THEME_COLOR_INSET_2_HOVER = (THEME_COLOR_D_1)
    pub THEME_COLOR_INSET_2_DOWN = (THEME_COLOR_INSET_2_HOVER)
    pub THEME_COLOR_INSET_2_ACTIVE = (THEME_COLOR_INSET_2_HOVER)
    pub THEME_COLOR_INSET_2_FOCUS = (THEME_COLOR_INSET_2_HOVER)
    pub THEME_COLOR_INSET_2_DRAG = (THEME_COLOR_INSET_2_HOVER)
    pub THEME_COLOR_INSET_2_DISABLED = (THEME_COLOR_D_025)
    pub THEME_COLOR_INSET_2_EMPTY = (THEME_COLOR_INSET_2)

    // WIDGET COLORS
    pub THEME_COLOR_OUTSET = (THEME_COLOR_U_3)
    pub THEME_COLOR_OUTSET_DOWN = (THEME_COLOR_U_1)
    pub THEME_COLOR_OUTSET_HOVER = (THEME_COLOR_U_4)
    pub THEME_COLOR_OUTSET_ACTIVE = (THEME_COLOR_U_5)
    pub THEME_COLOR_OUTSET_FOCUS = (THEME_COLOR_OUTSET)
    pub THEME_COLOR_OUTSET_DRAG = (THEME_COLOR_OUTSET_HOVER)
    pub THEME_COLOR_OUTSET_DISABLED = (THEME_COLOR_U_1)
    pub THEME_COLOR_OUTSET_INACTIVE = (THEME_COLOR_D_HIDDEN)

    pub THEME_COLOR_OUTSET_1 = (THEME_COLOR_U_4)
    pub THEME_COLOR_OUTSET_1_DOWN = (THEME_COLOR_D_2)
    pub THEME_COLOR_OUTSET_1_DRAG = (THEME_COLOR_OUTSET_1_DOWN)
    pub THEME_COLOR_OUTSET_1_HOVER = (THEME_COLOR_OUTSET_1)
    pub THEME_COLOR_OUTSET_1_ACTIVE = (THEME_COLOR_U_6)
    pub THEME_COLOR_OUTSET_1_FOCUS = (THEME_COLOR_OUTSET_1)
    pub THEME_COLOR_OUTSET_1_DISABLED = (THEME_COLOR_U_1)

    pub THEME_COLOR_OUTSET_2 = (THEME_COLOR_U_HIDDEN)
    pub THEME_COLOR_OUTSET_2_DOWN = (THEME_COLOR_D_HIDDEN)
    pub THEME_COLOR_OUTSET_2_HOVER = (THEME_COLOR_U_2)
    pub THEME_COLOR_OUTSET_2_DRAG = (THEME_COLOR_OUTSET_2_DOWN)
    pub THEME_COLOR_OUTSET_2_ACTIVE = (THEME_COLOR_U_4)
    pub THEME_COLOR_OUTSET_2_FOCUS = (THEME_COLOR_OUTSET_2_HOVER)
    pub THEME_COLOR_OUTSET_2_DISABLED = (THEME_COLOR_U_1)

    pub THEME_COLOR_ICON = (THEME_COLOR_U_2)
    pub THEME_COLOR_ICON_INACTIVE = (THEME_COLOR_INSET)
    pub THEME_COLOR_ICON_ACTIVE = (THEME_COLOR_D_4)
    pub THEME_COLOR_ICON_DISABLED = (THEME_COLOR_U_1)

    pub THEME_COLOR_MARK = (THEME_COLOR_D_4)
    pub THEME_COLOR_MARK_EMPTY = (THEME_COLOR_INSET)
    pub THEME_COLOR_MARK_OFF = (THEME_COLOR_D_HIDDEN)
    pub THEME_COLOR_MARK_HOVER = (THEME_COLOR_MARK)
    pub THEME_COLOR_MARK_ACTIVE = (THEME_COLOR_MARK)
    pub THEME_COLOR_MARK_ACTIVE_HOVER = (THEME_COLOR_MARK)
    pub THEME_COLOR_MARK_FOCUS = (THEME_COLOR_MARK)
    pub THEME_COLOR_MARK_DOWN = (THEME_COLOR_D_3)
    pub THEME_COLOR_MARK_DISABLED = (THEME_COLOR_D_HIDDEN)

    pub THEME_COLOR_SELECTION = (THEME_COLOR_U_HIDDEN)
    pub THEME_COLOR_SELECTION_HOVER = (THEME_COLOR_D_2)
    pub THEME_COLOR_SELECTION_DOWN = (THEME_COLOR_D_2)
    pub THEME_COLOR_SELECTION_FOCUS = (THEME_COLOR_D_2)
    pub THEME_COLOR_SELECTION_EMPTY = (THEME_COLOR_U_HIDDEN)
    pub THEME_COLOR_SELECTION_DISABLED = (THEME_COLOR_U_HIDDEN)

    // Progress bars, slider amounts etc.
    pub THEME_COLOR_VAL = (THEME_COLOR_OPAQUE_D_3)
    pub THEME_COLOR_VAL_HOVER = (THEME_COLOR_OPAQUE_D_4)
    pub THEME_COLOR_VAL_FOCUS = (THEME_COLOR_VAL_HOVER)
    pub THEME_COLOR_VAL_DRAG = (THEME_COLOR_VAL_HOVER)
    pub THEME_COLOR_VAL_DISABLED = (THEME_COLOR_D_HIDDEN)

    pub THEME_COLOR_VAL_1 = (THEME_COLOR_OPAQUE_D_3)
    pub THEME_COLOR_VAL_1_HOVER = (THEME_COLOR_OPAQUE_D_4)
    pub THEME_COLOR_VAL_1_FOCUS = (THEME_COLOR_VAL_1_HOVER)
    pub THEME_COLOR_VAL_1_DRAG = (THEME_COLOR_VAL_1_HOVER)
    pub THEME_COLOR_VAL_1_DISABLED = (THEME_COLOR_D_HIDDEN)
    
    pub THEME_COLOR_VAL_2 = (THEME_COLOR_OPAQUE_D_3)
    pub THEME_COLOR_VAL_2_HOVER = (THEME_COLOR_OPAQUE_D_4)
    pub THEME_COLOR_VAL_2_FOCUS = (THEME_COLOR_VAL_2_HOVER)
    pub THEME_COLOR_VAL_2_DRAG = (THEME_COLOR_VAL_2_HOVER)
    pub THEME_COLOR_VAL_2_DISABLED = (THEME_COLOR_D_HIDDEN)


    // WIDGET SPECIFIC COLORS
    pub THEME_COLOR_HANDLE: (THEME_COLOR_OPAQUE_U_4);
    pub THEME_COLOR_HANDLE_HOVER: (THEME_COLOR_HANDLE);
    pub THEME_COLOR_HANDLE_FOCUS: (THEME_COLOR_HANDLE);
    pub THEME_COLOR_HANDLE_DISABLED: (THEME_COLOR_OPAQUE_U_1);
    pub THEME_COLOR_HANDLE_DRAG: (THEME_COLOR_HANDLE);

    pub THEME_COLOR_HANDLE_1: (THEME_COLOR_OPAQUE_U_6);
    pub THEME_COLOR_HANDLE_1_HOVER: (THEME_COLOR_W);
    pub THEME_COLOR_HANDLE_1_FOCUS: (THEME_COLOR_HANDLE_1_HOVER);
    pub THEME_COLOR_HANDLE_1_DISABLED: (THEME_COLOR_OPAQUE_U_1);
    pub THEME_COLOR_HANDLE_1_DRAG: (THEME_COLOR_HANDLE_1_HOVER);

    pub THEME_COLOR_HANDLE_2: (THEME_COLOR_OPAQUE_U_1);
    pub THEME_COLOR_HANDLE_2_HOVER: (THEME_COLOR_OPAQUE_U_1);
    pub THEME_COLOR_HANDLE_2_FOCUS: (THEME_COLOR_HANDLE_2_HOVER);
    pub THEME_COLOR_HANDLE_2_DISABLED: (THEME_COLOR_OPAQUE_U_1);
    pub THEME_COLOR_HANDLE_2_DRAG: (THEME_COLOR_HANDLE_2_HOVER);

    pub THEME_COLOR_DOCK_TAB_ACTIVE = (THEME_COLOR_FG_APP)

    // TODO: THESE ARE APPLICATION SPECIFIC COLORS THAT SHOULD BE MOVED FROM THE GENERAL THEME TO THE GIVEN PROJECT
    pub THEME_COLOR_HIGH = #C00
    pub THEME_COLOR_MID = #FA0
    pub THEME_COLOR_LOW = #8A0
    pub THEME_COLOR_PANIC = #f0f
    pub THEME_COLOR_ICON_WAIT = (THEME_COLOR_LOW),
    pub THEME_COLOR_ERROR = (THEME_COLOR_HIGH),
    pub THEME_COLOR_WARNING = (THEME_COLOR_MID),
    pub THEME_COLOR_ICON_PANIC = (THEME_COLOR_HIGH)

    // TYPOGRAPHY
    pub THEME_FONT_SIZE_CODE = 9.0
    pub THEME_FONT_WDGT_LINE_SPACING = 1.2
    pub THEME_FONT_HL_LINE_SPACING = 1.05
    pub THEME_FONT_LONGFORM_LINE_SPACING = 1.2

    pub THEME_FONT_SIZE_1 = (THEME_FONT_SIZE_BASE + 8 * THEME_FONT_SIZE_CONTRAST)
    pub THEME_FONT_SIZE_2 = (THEME_FONT_SIZE_BASE + 4 * THEME_FONT_SIZE_CONTRAST)
    pub THEME_FONT_SIZE_3 = (THEME_FONT_SIZE_BASE + 2 * THEME_FONT_SIZE_CONTRAST)
    pub THEME_FONT_SIZE_4 = (THEME_FONT_SIZE_BASE + 1 * THEME_FONT_SIZE_CONTRAST)
    pub THEME_FONT_SIZE_P = (THEME_FONT_SIZE_BASE)

    pub THEME_FONT_LABEL = {
        font_family:{
            latin = font("crate://self/resources/IBMPlexSans-Text.ttf", -0.1, 0.0),
            chinese = font(
                "crate://makepad_fonts_chinese_regular/resources/LXGWWenKaiRegular.ttf",
                "crate://makepad_fonts_chinese_regular_2/resources/LXGWWenKaiRegular.ttf.2",
                0.0, 
                0.0)
            emoji = font("crate://makepad_fonts_emoji/resources/NotoColorEmoji.ttf", 0.0, 0.0)
        },
        line_spacing: 1.2
    } // TODO: LEGACY, REMOVE. REQUIRED BY RUN LIST IN STUDIO ATM
    pub THEME_FONT_REGULAR = {
        font_family: {
            latin = font("crate://self/resources/IBMPlexSans-Text.ttf", -0.1, 0.0),
            chinese = font(
                "crate://makepad_fonts_chinese_regular/resources/LXGWWenKaiRegular.ttf",
                "crate://makepad_fonts_chinese_regular_2/resources/LXGWWenKaiRegular.ttf.2",
                0.0, 
                0.0)
            emoji = font("crate://makepad_fonts_emoji/resources/NotoColorEmoji.ttf", 0.0, 0.0)
        },
        line_spacing: 1.2
    }
    pub THEME_FONT_BOLD = {
        font_family:{
            latin = font("crate://self/resources/IBMPlexSans-SemiBold.ttf", -0.1, 0.0),
            chinese = font(
                "crate://makepad_fonts_chinese_bold/resources/LXGWWenKaiBold.ttf",
                "crate://makepad_fonts_chinese_bold_2/resources/LXGWWenKaiBold.ttf.2",
                0.0, 
                0.0)
            emoji = font("crate://makepad_fonts_emoji/resources/NotoColorEmoji.ttf", 0.0, 0.0)
        },
        line_spacing: 1.2
    }
    pub THEME_FONT_ITALIC = {
        font_family:{
            latin = font("crate://self/resources/IBMPlexSans-Italic.ttf", -0.1, 0.0),
            chinese = font(
                "crate://makepad_fonts_chinese_regular/resources/LXGWWenKaiRegular.ttf",
                "crate://makepad_fonts_chinese_regular_2/resources/LXGWWenKaiRegular.ttf.2",
                0.0, 
                0.0)
        },
        line_spacing: 1.2
    }
    pub THEME_FONT_BOLD_ITALIC = {
        font_family:{
            latin = font("crate://self/resources/IBMPlexSans-BoldItalic.ttf", -0.1, 0.0),
            chinese = font(
                "crate://makepad_fonts_chinese_bold/resources/LXGWWenKaiBold.ttf",
                "crate://makepad_fonts_chinese_bold_2/resources/LXGWWenKaiBold.ttf.2",
                0.0, 
                0.0)
        },
        line_spacing: 1.2
    }
    pub THEME_FONT_CODE = {
        font_size: (THEME_FONT_SIZE_CODE),
        font_family:{
            latin = font("crate://self/resources/LiberationMono-Regular.ttf", 0.0, 0.0)
        },
        line_spacing: 1.35
    }
    pub THEME_FONT_ICONS = {
        font_family:{
            latin = font("crate://self/resources/fa-solid-900.ttf", 0.0, 0.0)
        },
        line_spacing: 1.2,
    }
}
